var express = require('express');
var router = express.Router();
var token = require('../util/tokenUtil.js');
var writeDao = require('../dao/writeDao.js');
var blogDao = require('../dao/blogDao')

/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('index', { title: 'Express' });
});

router.use('/search',function(req, res, next) {
    blogDao.search(req, res, next);
});

router.use('/lists',function(req, res, next) {
    blogDao.lists(req, res, next);
});

router.use('/page',function(req, res, next) {
    blogDao.page(req, res, next);
});

router.use('/detail',function(req, res, next) {
    blogDao.detail(req, res, next);
});

router.use('/tag_list',function(req, res, next) {
    blogDao.tagList(req, res, next);
});

module.exports = router;
